home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 2
/
Merciful - Disc 2.iso
/
software
/
k
/
kids7.dms
/
kids7.adf
/
travel.amos
/
travel.amosSourceCode
< prev
Wrap
AMOS Source Code
|
1992-10-04
|
8KB
|
203 lines
Dim ANS(3),TRIP(10)
Global ANS(),TRIP(),CAUGHT,CUC,NAME$,SCORE,LEVEL
STRIPPER
FINDANS
INIT
'
CATCHACAB
CATCHATRAIN
CATCHABUS
CATCHACRAB
'
Procedure FINDANS
Music 1 : Colour Back $BBB : If Screen=0 Then Screen Close 0
Get Fonts : Screen Open 0,352,272,32,Lowres : Screen Display 0,120,34,, : Curs Off : Flash Off
Get Bob Palette : Cls 21 : Set Font 3 : Ink 30,21 : TX=50 : TY=100
Text 50,40,"we went in...."
Dim VH$(3) : VH$(1)="taxi" : VH$(2)="train" : VH$(3)="bus" : PQ=Rnd(2)+1
For M=1 To 3
X=Rnd(6)+1 : Restore CUL : For N=1 To X : Read CL$,C : Next N
If LEVEL=1
T=M
Else
If PQ=1 : Restore SW1 : End If
If PQ=2 : Restore SW2 : End If
If PQ=3 : Restore SW3 : End If
For N=1 To M : Read T : Next N
End If
If LEVEL<3 Then Ink C,21 Else Ink 30,21
ANS(T)=C : Text 50,TY,"a "+VH$(T)+" that was "+CL$+"..."
Add TY,60
Next M
Locate ,30 : Pen 3 : Paper 21 : Centre "Click to continue" : Flash 3,"(f00,25)(bbb,25)"
Repeat : MK=Mouse Key : Until MK>0
CUL: Data "red",4,"blue",10,"green",14,"orange",18,"grey",23,"brown",27,"pink",28
SW1: Data 3,2,1
SW2: Data 2,1,3
SW3: Data 3,1,2
End Proc
Procedure SETCLOCK
Gr Writing 8 : Ink 6 : Text 28,135,"88 88" : Gr Writing 1
Get Bob 1,2,21,116 To 94,144
Bob 9,140,-30,2
End Proc
Procedure CATCHACAB
MAKETRACKS
CATCHACOLOUR
CHQ=0 : I=Rnd(9)+1 : TRIP(I)=ANS(1)
Repeat
Screen 1 : Add CHQ,1,1 To 10
CUC=TRIP(CHQ) : Ink CUC : Paint 64,64 : Wait 3
Get Bob 1,1,8,12 To 105,108 : Wait Vbl : Screen 0
Bob 1,-80,140,1 : Bob 10,80,279,7 : Wait Vbl
Amal 1,"M 210,0,100" : Amal On 1 : Amal 10,"M 0,-80,100" : Amal On 10
While Chanmv(1) or Chanmv(10) : Wend
CHECK
If CAUGHT=1
Bob Off 11 : Screen 1 : Paste Bob 27,29,3
Get Bob 1,1,8,12 To 105,108 : Wait Vbl : Screen 0 : Wait 15
End If
Amal 1,"M 250,0,50" : Amal On 1 : Amal 10,"M 0,80,50" : Amal On 10
While Chanmv(1) or Chanmv(10) or Chanmv(11) : Wend
Until CAUGHT=1
End Proc
Procedure CATCHABUS
MAKETRACKS
CATCHACOLOUR
CHQ=0 : I=Rnd(9)+1 : TRIP(I)=ANS(3)
Repeat
Screen 1 : Add CHQ,1,1 To 10
CUC=TRIP(CHQ) : Ink CUC : Paint 198,58 : Wait 3
Get Bob 1,1,132,13 To 265,135 : Wait Vbl : Screen 0
Bob 1,-80,115,1 : Bob 10,80,279,7 : Wait Vbl
Amal 1,"M 210,0,200" : Amal On 1 : Amal 10,"M 0,-80,100" : Amal On 10
While Chanmv(1) or Chanmv(10) : Wend
CHECK
If CAUGHT=3
Bob Off 11 : Screen 1 : Paste Bob 168,31,3
Get Bob 1,1,132,13 To 265,135 : Wait Vbl : Screen 0 : Wait 15
End If
Amal 1,"M 250,0,50" : Amal On 1 : Amal 10,"M 0,80,50" : Amal On 10
While Chanmv(1) or Chanmv(10) or Chanmv(11) : Wend
Until CAUGHT=3
ARRIVE
Data 4,10,14,18,23,27,28
End Proc
Procedure CATCHATRAIN
MAKETRACKS
CATCHACOLOUR
CHQ=0 : I=Rnd(9)+1 : TRIP(I)=ANS(2)
Repeat
Screen 1 : Add CHQ,1,1 To 10
CUC=TRIP(CHQ) : Ink CUC : Paint 135,195 : Wait 3
Get Bob 1,1,29,154 To 243,239 : Wait Vbl : Screen 0
Bob 1,-180,135,1 : Bob 10,80,279,7 : Wait Vbl
Amal 1,"M 210,0,150" : Amal On 1 : Amal 10,"M 0,-80,100" : Amal On 10
While Chanmv(1) or Chanmv(10) : Wend
CHECK
If CAUGHT=2
Bob Off 11 : Screen 1 : Paste Bob 109,170,3
Get Bob 1,1,29,154 To 243,239 : Wait Vbl : Screen 0 : Wait 15
End If
Amal 1,"M 320,0,50" : Amal On 1 : Amal 10,"M 0,80,50" : Amal On 10
While Chanmv(1) or Chanmv(10) or Chanmv(11) : Wend
Until CAUGHT=2
Data 4,10,14,18,23,27,28
End Proc
Procedure CATCHACOLD
End Proc
Procedure CATCHACRAB
Screen Open 0,640,200,4,Hires : Screen Hide 0 : Curs Off : Flash Off : Palette $BBB,$F,$FFF,$555 : Set Font 3
Unpack 9 To 1 : Screen To Back : Get Bob 1,1,0,0 To 180,56 : Screen 0
Cls 0 : Cls 2,50,5 To 500,190 : Ink 3
Draw 50,190 To 500,190 : Draw 500,5 To 500,190
Draw 51,191 To 501,191 : Draw 501,6 To 501,191
Ink 1,2 : Text 90,25,"Dear Duncan,"
Text 80,45,"I arrived safely with a little bit of help "
Text 80,65,"from "+NAME$+"." : S$=Str$(SCORE)
Text 80,88,"A total of "+S$+" points has been scored."
Text 80,110,"I will send you some postcards and let"
Text 80,130,"you know how I am getting on."
Text 90,160,"Your little"
Wait Vbl : Screen Show 0 : Locate ,24 : Pen 1 : Paper 0
Paste Bob 200,133,1 : Screen Close 1
Centre "Click to continue" : Repeat : MK=Mouse Key : Until MK<>0
Screen 0 : Cls 0 : Amal Off : Bob Off : Limit Mouse : Ink 1,0
Text 20,100,"Having a lovely time..."
A$=NAME$+"|"+Str$(LEVEL)+"/XXX\"+Str$(SCORE) : Command Line$=A$
Show On : Run "KIDS-7:cards.amos"
End Proc
Procedure CATCHACOLOUR
For N=1 To 10 : TRIP(N)=0 : Next N : CHQ=0
Repeat
Repeat
C=Rnd(6)+1 : Restore : For N=1 To C : Read I : Next N : GOOD=True
For N=1 To 10
If I=ANS(CAUGHT+1) Then GOOD=False
Next N
Until GOOD
TRIP(CHQ)=I : Inc CHQ
Until CHQ=11
Data 4,10,14,18,23,27,28
End Proc
Procedure MAKETRACKS
C=2 : Screen 0 : Bob Off : Cls 21 : Screen Hide 0 : Wait Vbl
If CAUGHT=0
For N=50 To 300 Step 50 : Paste Bob N-30,70,4 : Bob C,N-14,70,5 : Inc C : Next N
Ink 23 : Draw 0,201 To 340,201 : Draw 0,244 To 340,244
End If
If CAUGHT=1
For N=1 To 390 Step 32 : Paste Bob N,215,9 : Next N
For N=3 To 390 Step 100 : Paste Bob N,70,4 : Next N
Ink 23 : Draw 0,201 To 340,201
' Draw 0,244 To 340,244
Bob 2,30,160,10 : Bob 3,70,160,10 : Bob 4,20,160,11
Bob 5,238,160,10 : Bob 6,310,160,10 : Bob 7,225,160,12
End If
If CAUGHT=2
Ink 23 : Draw 0,201 To 340,201 : Draw 0,244 To 340,244
For N=3 To 390 Step 60 : Paste Bob N,70,4 : Next N
For N=50 To 300 Step 80 : Bob C,N-14,70,5 : Inc C : Next N
End If
Screen Show 0
End Proc
Procedure INIT
Double Buffer : Cls 21 : Unpack 10 To 1 : Screen Hide 1 : Set Font 3 : Screen 0
Channel 1 To Bob 1 : Channel 9 To Bob 9 : Channel 10 To Bob 10 : Channel 11 To Bob 11
CAUGHT=0 : Limit Mouse 215,268 To 360,268 : Hide
End Proc
Procedure CHECK
Wait 5 : Bob 11,-40,210,8 : Amal 11,"M 70,0,20" : Amal On 11 : While Chanmv(11) or Chanmv(10) : Wend
Flash 6,"(DDD,10)(000,20)" : Wait Vbl : Show
Bob 11,30,210,8 : Amal 11,"L: M 0,-20,50; M 0,20,50; J L" : Amal On 11
Repeat
MK=Mouse Key
Until MK>0
Hide
GOOD=False
If X Mouse<237
If CUC=ANS(CAUGHT+1)
Sam Play 6,2,20000 : Inc CAUGHT : Add SCORE,50 : GOOD=True
Else
Sam Play 6,1,11000
Wait 8 : Sam Play 6,1,9000 : Add SCORE,-20
End If
Else If X Mouse>340 and CUC=ANS(CAUGHT+1)
Sam Play 6,1,11000
Wait 8 : Sam Play 6,1,9000 : Add SCORE,-20
End If
If Not GOOD
Bob 11,30,210,8 : Amal Off 11 : Amal 11,"M -70,0,50" : Amal On 11 : Flash Off
End If
End Proc
Procedure ARRIVE
Bob 12,240,80,6 : Bob 1,-80,115,1 : Amal 1,"M 310,0,200" : Amal On 1
While Chanmv(1) : Wend : Wait 30
Bob 11,195,210,8 : Amal 11,"L: M 0,-30,50; M 0,30,50; J L" : Amal On 11
Wait 200 : Amal Off : Bob Off : Screen Close 1 : Screen Close 0
End Proc
Procedure STRIPPER
A$=Command Line$ : A=Instr(A$,"|") : B=Instr(A$,"/") : C=Instr(A$,"\") : L=Len(A$)
NAME$=Left$(A$,A-1) : L$=Mid$(A$,A+1,B-A-1) : LEVEL=Val(L$)
X$=Mid$(A$,B+1,C-B-1) : S$=Right$(A$,L-C) : SCORE=Val(S$)
End Proc